import { HookType } from './type';
import { createCardAll } from './createCard';
/**
 * 控制配置
 */
export const controlConfig = () => {
  return {
    isRemove: false,
    isRevoke: false,
    isShuflleTheCard: false,
    resucrrection: false,
    /**
     * 是否消除中
     */
    isBeingEliminated: false,
    /**
     * 删除后重复执行一次
     */
    isExeOnce: false,
  }
}
export const initmaskControl = () => {
  return {
    isTranMaskAnimation: false,
  }
}
export const initHook = (): HookType => {
  return {
    heapList: [],
    poolList: [],
    layerList: [],
  }
}
export const createLevel = ({level = 1, publice}) => {
  switch(level) {
    case 1: {
      return createCardAll({head: {number: 12, diff: 2}, row: {number: 0, diff: 3}, publice});
    };
    case 2: {
      return createCardAll({head: {number: 150, diff: 9}, row: {number: 18, diff: 9}, publice});
    };
    case 3: {
      return createCardAll({head: {number: 84, diff: 5}, row: {number: 4, diff: 5}, publice});
    };
    case 4: {
      return createCardAll({head: {number: 168, diff: 9}, row: {number: 8, diff: 9}, publice});
    };
    case 5: {
      return createCardAll({head: {number: 316, diff: 9}, row: {number: 16, diff: 9}, publice});
    };
  };
  return createCardAll({head: {number: 0, diff: 3}, row: {number: 0, diff: 3}, publice});
}
